<?php
/*
 * @Author: your name
 * @Date: 2021-12-07 09:50:02
 * @LastEditTime: 2021-12-22 16:26:16
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \property\app\Http\Controllers\find_shop\User.php
 */

namespace App\Http\Controllers\find_shop;

use Illuminate\Support\Facades\Request;
// use  App\Http\Controllers\redis\RedisController as Redis;
use  App\Models\admin_model\TowerBuilding as TowerBuildingDB;

class TowerBuilding extends BaseController
{
    public function buildingSelOne()
    {
        if (Request::has('id')) {
            $id   =  Request::input('id');
            $user =  new User;
            $res =   $user->checkToken(false)? TowerBuildingDB::buildingWebSelOneUser($id,$this->getLoginMsg()): TowerBuildingDB::buildingWebSelOne($id);
           
            if($res){
                return $this->create(200,'查询成功',  $res[0]);
            }
        } else {
            return missingParameter();
        }
    }

    public function buildingWebListRand(){
        if (Request::has('limit') && Request::has('id')) {
            return $this->create(200,'查询成功',   TowerBuildingDB::buildingWebListRand(Request::input('id'),Request::input('limit')));
        }
    }

    // public function storeList
}
